home *** CD-ROM | disk | FTP | other *** search
- /* Mtypes.h - Copyright 1993 Steve Ludtke */
- /* This file contains type definitions required by various classes */
-
- #include <3Dkit/3Dkit.h>
-
- #define SQR(x) ((x)*(x))
-
- /* SelectView */
- #define MAXTEXT 50
-
- struct SELDAT {
- char text[MAXTEXT]; /* text to display for each line */
- short sel; /* number selected, ie - 1st selected=1 */
- short stab; /* sort of a separate array containing an ordered */
- /* of the selected cells */
- };
-
- /* MolObj */
- #define MAXMOL 2 /* max # of molecules, currently only 1 supported */
- #define MAXAA 100 /* max # amino acids/molecule */
- #define NEL 84 /* # elements in data file */
-
- typedef struct { float x,y,z; } Vec; /* vector structure corresponding */
- /* to RtPoint */
-
- /* element information from covalent.dat */
- struct ELINFO {
- char name[2];
- float rad;
- float arad;
- RtColor color;
- id image;
- };
-
- /* a bond between atoms */
- struct LBOND {
- int n1,n2; /* the 2 atoms which are bonded */
- float d,w; /* currently unused, length and weight of bond */
- char type; /* bond type, not used consistently yet */
- };
-
- /* an atom */
- struct ATOM {
- unsigned char anum,cnum; /* atomic number and atom # within residue */
- char type[3]; /* additional atom type info, inconsistent usage */
- short numb,bnd[4]; /* atoms bonded to this one, max 4 for now */
- float bndl[4]; /* length of each bond, not used (?) */
- char tag,sel; /* flags used for molecule manipulations */
- };
-
- /* an amino acid */
- struct AMINO {
- short n,c1,c2,cn,cn2,h,o,sc; /* points to individual atoms in the */
- /* backbone for dihedral calcs. */
- float phi,psi,omega; /* dihedrals, standard IUPAC definition */
- short anum; /* type of amino acid (# in acid[] array) */
- char sel; /* flag used for manipulations */
- };
-
- typedef struct ATOM Atom;
-
- /* molecule structure, currently the program only supports one molecule */
- /* at a time */
- struct MOLECULE {
- Atom *atom; /* array of atoms in the molecule */
- RtPoint *coord; /* atom coordinates, seperate from atom struct. */
- /* for drawing efficiency */
- struct LBOND *lb; /* table of bonds */
- int numa,numlb,numaa; /* number of atoms,bonds, and amino acids */
- RtInt *verts,*nverts; /* array used for quick drawing */
- struct AMINO am[MAXAA]; /* array of amino acids, not dynamically alloc yet */
- };
-
- typedef struct MOLECULE Molecule;
-
- /* D3View */
- #define TIMESTEP .1 /* Time between updates (in seconds)*/
-
- #define DRC (M_PI/180.0) /* degree->radian conversion */
-
- /* structure used in quick drawing mode */
- struct DSORT {
- RtPoint c;
- int anum:31;
- int sel:1;
- };
-
- /* 3d point structure (same as Vec defined above) */
- typedef struct {
- float x,y,z;
- } Point;
-
- /* AminoView */
- /* definition of amino acid info structure, currently contains only */
- /* 20 of the most common amino acids + unknown */
- typedef struct { char *d1,*d2,*d3; long wt; int phob; short nc,ns,no,nn; } ACID;
-
- #define AADEF 21 /* number of acids in info table (see AminoView.m) */
- #define MAXSEQ 100 /* max # amino acids in AminoView sequence */
-
- /* wraps.psw - postscript font selection routines */
- void PSsethel();
- void PSsetohlfs();
- void PSsetsymb();
- void PSsetsma();
-